package com.amikomgamedev.labirinhantu.grafik;

import java.util.ArrayList;

import org.andengine.engine.camera.ZoomCamera;
import org.andengine.engine.camera.hud.HUD;
import org.andengine.engine.camera.hud.controls.BaseOnScreenControl.IOnScreenControlListener;
import org.andengine.engine.camera.hud.controls.DigitalOnScreenControl;
import org.andengine.entity.primitive.Rectangle;
import org.andengine.entity.scene.Scene;
import org.andengine.entity.sprite.AnimatedSprite;
import org.andengine.entity.sprite.Sprite;
import org.andengine.entity.sprite.TiledSprite;
import org.andengine.extension.tmx.TMXLayer;
import org.andengine.extension.tmx.TMXLoader;
import org.andengine.extension.tmx.TMXTiledMap;
import org.andengine.opengl.texture.TextureManager;
import org.andengine.opengl.texture.atlas.bitmap.BitmapTextureAtlas;
import org.andengine.opengl.texture.atlas.bitmap.BitmapTextureAtlasTextureRegionFactory;
import org.andengine.opengl.texture.region.TextureRegion;
import org.andengine.opengl.texture.region.TiledTextureRegion;
import org.andengine.opengl.vbo.VertexBufferObjectManager;
import org.andengine.ui.activity.BaseGameActivity;

import android.content.Context;

import com.amikomgamedev.labirinhantu.Cheat;
import com.amikomgamedev.labirinhantu.Server_Data;
import com.amikomgamedev.labirinhantu.Utils;
import com.amikomgamedev.labirinhantu.game.Game_Data;

public class Grafik_Load
	implements
	    Game_Data,
	    Grafik_Data_Path,
	    Grafik_Data,
	    Grafik_Define,
	    Cheat
{
    protected BaseGameActivity	 activity;
    protected Scene		    m_Scene;
    protected HUD		      m_Hud;
    protected ZoomCamera	       m_Camera;
    protected IOnScreenControlListener m_Control;

    protected BitmapTextureAtlas       tex_;
    protected TextureRegion	    reg_;
    public Sprite		      spr_;

    protected BitmapTextureAtlas[]       tex_Logo	= new BitmapTextureAtlas[LOGO.length];
    protected TextureRegion[]	    reg_Logo		= new TextureRegion[LOGO.length];
    public Sprite[]		      spr_Logo		= new Sprite[LOGO.length];

    protected BitmapTextureAtlas       tex_LogoHantu;
    protected TextureRegion	    reg_LogoHantu;
    public Sprite		      spr_LogoHantu;

    protected BitmapTextureAtlas[]	tex_Icon_Social	= new BitmapTextureAtlas[ICON_SOCIAL.length];
    protected TextureRegion[]		reg_Icon_Social	= new TextureRegion[ICON_SOCIAL.length];
    public Sprite[]			spr_Icon_Social	= new Sprite[ICON_SOCIAL.length];
    public Sprite			spr_Icon_Social_Game;

    protected BitmapTextureAtlas       tex_Loading;
    protected TextureRegion	    reg_Menu_Loading;
    public Sprite		      spr_Menu_Loading;

    protected BitmapTextureAtlas       tex_Menu_Main_Bg;
    protected TextureRegion	    reg_Menu_Main_Bg;
    public Sprite		      spr_Menu_Main_Bg;

    protected BitmapTextureAtlas[]     tex_Menu_Main_Btn	     = new BitmapTextureAtlas[MENU_MAIN_BTN.length];
    protected TextureRegion[]	  reg_Menu_Main_Btn	     = new TextureRegion[MENU_MAIN_BTN.length];
    public Sprite[]		    spr_Menu_Main_Btn	     = new Sprite[MENU_MAIN_BTN.length];
    public boolean		     is_Menu_Main_Active;

    protected BitmapTextureAtlas       tex_Menu_Lingkaran;
    protected TiledTextureRegion       reg_Menu_Lingkaran;
    public TiledSprite		 spr_Menu_Lingkaran;
    public ArrayList<TiledSprite>      lst_Menu_Stage_Lingkaran      = new ArrayList<TiledSprite>();
    public ArrayList<TiledSprite>      lst_Menu_Level_Lingkaran      = new ArrayList<TiledSprite>();
    public ArrayList<TiledSprite>      lst_Menu_Help_Lingkaran      = new ArrayList<TiledSprite>();

    protected BitmapTextureAtlas[]     tex_Menu_Select_Stage	 = new BitmapTextureAtlas[MENU_SELECT_STAGE_BG.length];
    protected TextureRegion[]	  reg_Menu_Select_Stage	 = new TextureRegion[MENU_SELECT_STAGE_BG.length];
    public Sprite[]		    spr_Menu_Select_Stage	 = new Sprite[MENU_SELECT_STAGE_BG.length];
    public Sprite[]		    spr_Btn_Menu_Select_Stage     = new Sprite[2];

    protected BitmapTextureAtlas       tex_Menu_Lonceng;
    protected TiledTextureRegion       reg_Menu_Lonceng;
    public AnimatedSprite	      asp_Menu_Lonceng;

    protected BitmapTextureAtlas       tex_Menu_Kelelawar;
    protected TiledTextureRegion       reg_Menu_Kelelawar;
    public AnimatedSprite	      spr_Menu_Kelelawar;

    protected BitmapTextureAtlas[]     tex_Menu_Level_Bg	     = new BitmapTextureAtlas[3];
    protected TextureRegion[]	  reg_Menu_Level_Bg	     = new TextureRegion[3];
    public Sprite		      spr_Menu_Level_Bg;
    public Rectangle[]		 rec_Menu_Level_Bg	     = new Rectangle[2];

    protected BitmapTextureAtlas       tex_Menu_Level_Btn;
    protected TextureRegion	    reg_Menu_Level_Btn;
    public Sprite[]		    spr_Menu_Level_Btn	    = new Sprite[20];
    public boolean		     is_Menu_Level_Active;

    protected BitmapTextureAtlas       tex_Menu_Level_Btn_Normal;
    protected TextureRegion	    reg_Menu_Level_Btn_Normal;
    public Sprite		      spr_Menu_Level_Btn_Normal;

    protected BitmapTextureAtlas       tex_Menu_Level_Btn_Gembok;
    protected TextureRegion	    reg_Menu_Level_Btn_Gembok;
    public Sprite		      spr_Menu_Level_Btn_Gembok;
    public ArrayList<Sprite>	   lst_Menu_Level_Btn_Gembok     = new ArrayList<Sprite>();

    public BitmapTextureAtlas       tex_Menu_Level_Btn_Tulang;
    protected TextureRegion	    reg_Menu_Level_Btn_Tulang;
    public Sprite[][]		  spr_Menu_Level_Btn_Tulang     = new Sprite[20][3];

    protected BitmapTextureAtlas       tex_Menu_Credits_Bg;
    protected TextureRegion	    reg_Menu_Credits_Bg;
    public Sprite		      spr_Menu_Credits_Bg;

    protected BitmapTextureAtlas       tex_Menu_Credits_Logo_Amikom;
    protected TextureRegion	    reg_Menu_Credits_Logo_Amikom;
    public Sprite		      spr_Menu_Credits_Logo_Amikom;
    public Sprite		      spr_Menu_Credits_Logo_Hantu;

    protected BitmapTextureAtlas       tex_Menu_Credits_Logo_Agd;
    protected TextureRegion	    reg_Menu_Credits_Logo_Agd;
    public Sprite		      spr_Menu_Credits_Logo_Agd;

    protected BitmapTextureAtlas[]     tex_Menu_Help		 = new BitmapTextureAtlas[2];
    protected TextureRegion[]	  reg_Menu_Help		 = new TextureRegion[2];
    public Sprite[]		    spr_Menu_Help		 = new Sprite[2];

//    protected BitmapTextureAtlas       tex_Menu_Help_Bg;
//    protected TextureRegion	    reg_Menu_Help_Bg;
//    public Sprite		      spr_Menu_Help_Bg;
//
//    protected BitmapTextureAtlas       tex_Menu_Help_Coin;
//    protected TiledTextureRegion       reg_Menu_Help_Coin;
//    public TiledSprite		 spr_Menu_Help_Coin;
//
//    protected BitmapTextureAtlas       tex_Menu_Help_Pelampung;
//    protected TextureRegion	    reg_Menu_Help_Pelampung;
//    public Sprite		      spr_Menu_Help_Pelampung;
//
//    protected BitmapTextureAtlas       tex_Menu_Help_Tombol;
//    protected TextureRegion	    reg_Menu_Help_Tombol;
//    public Sprite		      spr_Menu_Help_Tombol;

    protected BitmapTextureAtlas       tex_Menu_Mc_Bernafas;
    protected TiledTextureRegion       reg_Menu_Mc_Bernafas;
    public AnimatedSprite	      spr_Menu_Mc_Bernafas;

    protected TMXLoader		tmx_Load_Game_Play;
    protected TMXTiledMap	      tmx_Tiled_Game_Play;
    public TMXLayer		    tmx_Layer_Game_Play;
    protected Rectangle		rec_Game_Play_Bg;

    protected TMXLoader		tmx_Load_Game_Win;
    protected TMXTiledMap	      tmx_Tiled_Game_Win;
    public TMXLayer		    tmx_Layer_Game_Win;

    protected TMXLoader		tmx_Load_Informasi;
    protected TMXTiledMap	      tmx_Tiled_Informasi;
    public TMXLayer		    tmx_Layer_Informasi;

    protected BitmapTextureAtlas[]     tex_Game_Play_Mc	      = new BitmapTextureAtlas[2];
    protected TiledTextureRegion[]     reg_Game_Play_Mc	      = new TiledTextureRegion[2];
    public AnimatedSprite[]	    spr_Game_Play_Mc	      = new AnimatedSprite[2];

    protected BitmapTextureAtlas[]     tex_Game_Play_Btn	     = new BitmapTextureAtlas[2];
    protected TiledTextureRegion[]     reg_Game_Play_Btn	     = new TiledTextureRegion[2];
    public TiledSprite[]	       spr_Game_Play_Btn	     = new TiledSprite[2];
    public Rectangle		   rec_Game_Play_Btn;
    public ArrayList<Rectangle>	lst_Game_Play_Btn	     = new ArrayList<Rectangle>();

    public BitmapTextureAtlas	  tex_Game_Play_Control;
    public TextureRegion	       reg_Game_Play_Control_Base,
	    reg_Game_Play_Control_Knob;
    public DigitalOnScreenControl      dig_Game_Play_Control;

    protected BitmapTextureAtlas       tex_Game_Play_Float;
    protected TiledTextureRegion       reg_Game_Play_Float;
    public AnimatedSprite	      spr_Game_Play_Float;
    public ArrayList<AnimatedSprite>   lst_Game_Play_Float	   = new ArrayList<AnimatedSprite>();

    protected BitmapTextureAtlas[]     tex_Game_Play_Ghost	   = new BitmapTextureAtlas[3];
    protected TiledTextureRegion[]     reg_Game_Play_Ghost	   = new TiledTextureRegion[3];
    public AnimatedSprite	      spr_Game_Play_Ghost;
    public ArrayList<AnimatedSprite>   lst_Game_Play_Ghost	   = new ArrayList<AnimatedSprite>();
    public ArrayList<AnimatedSprite>   lst_Game_Play_Ghost_Invisible = new ArrayList<AnimatedSprite>();

    protected BitmapTextureAtlas       tex_Game_Play_Collection;
    protected TiledTextureRegion       reg_Game_Play_Collection;
    public AnimatedSprite	      spr_Game_Play_Collection;
    public TiledSprite		 spr_Game_Play_Koin;
    public ArrayList<AnimatedSprite>   lst_Game_Play_Collection      = new ArrayList<AnimatedSprite>();

    protected BitmapTextureAtlas       tex_Game_Play_Fire;
    protected TiledTextureRegion       reg_Game_Play_Fire;
    public AnimatedSprite	      spr_Game_Play_Fire;
    public ArrayList<AnimatedSprite>   lst_Game_Play_Fire	    = new ArrayList<AnimatedSprite>();
    public Rectangle		   rec_Game_Play_Fire;
    public ArrayList<Rectangle>	lst_rec_Game_Play_Fire	= new ArrayList<Rectangle>();

    protected BitmapTextureAtlas       tex_Game_Play_Mist;
    protected TiledTextureRegion       reg_Game_Play_Mist;
    public AnimatedSprite	      spr_Game_Play_Mist;
    public ArrayList<AnimatedSprite>   lst_Game_Play_Mist	    = new ArrayList<AnimatedSprite>();

    protected BitmapTextureAtlas       tex_Game_Play_Water;
    protected TiledTextureRegion       reg_Game_Play_Water;
    protected AnimatedSprite	   spr_Game_Play_Water;
    public ArrayList<AnimatedSprite>   lst_Game_Play_Water	   = new ArrayList<AnimatedSprite>();

    protected Rectangle		rec_Game_Play_Wall;
    public ArrayList<Rectangle>	lst_Game_Play_Wall	    = new ArrayList<Rectangle>();

    public Rectangle		   rec_Game_Play_Btn_Mist;
    public ArrayList<Rectangle>	lst_Game_Play_Btn_Mist	= new ArrayList<Rectangle>();

    protected Rectangle		rec_Game_Play_Finish;
    public ArrayList<Rectangle>	lst_Game_Play_Finish	  = new ArrayList<Rectangle>();

    protected BitmapTextureAtlas       tex_Game_Play_Btn_Ghost;
    protected TiledTextureRegion       reg_Game_Play_Btn_Ghost;
    protected TiledSprite	      spr_Game_Play_Btn_Ghost;
    public ArrayList<TiledSprite>      lst_Game_Play_Btn_Ghost       = new ArrayList<TiledSprite>();

    protected TiledSprite	      spr_Game_Play_Item_Right;
    public ArrayList<TiledSprite>      lst_Game_Play_Item_Right      = new ArrayList<TiledSprite>();

    protected TiledSprite	      spr_Game_Play_Item_Left;
    public ArrayList<TiledSprite>      lst_Game_Play_Item_Left       = new ArrayList<TiledSprite>();

    protected Rectangle		rec_Game_Play_Move_Ghost;
    public ArrayList<Rectangle>	lst_Game_Play_Move_Ghost      = new ArrayList<Rectangle>();

    protected BitmapTextureAtlas       tex_Game_Play_Taskbar_Bg;
    protected TextureRegion	    reg_Game_Play_Taskbar_Bg;
    public Sprite		      spr_Game_Play_Taskbar_Bg;

    protected BitmapTextureAtlas       tex_Game_Play_TaskBar_Mc;
    protected TiledTextureRegion       reg_Game_Play_TaskBar_Mc;
    public AnimatedSprite	      spr_Game_Play_TaskBar_Mc;

    protected BitmapTextureAtlas       tex_Game_Play_TaskBar_Btn;
    protected TextureRegion	    reg_Game_Play_TaskBar_Btn;
    public Sprite		      spr_Game_Play_TaskBar_Btn;

    protected BitmapTextureAtlas       tex_Game_Play_Taskbar_Rule;
    protected TiledTextureRegion       reg_Game_Play_Taskbar_Rule;
    public TiledSprite		 spr_Game_Play_Taskbar_Rule;
    public ArrayList<TiledSprite>      lst_Game_Play_Taskbar_Rule    = new ArrayList<TiledSprite>();

    protected BitmapTextureAtlas       tex_Game_Pause_Bg;
    protected TextureRegion	    reg_Game_Pause_Bg;
    public Sprite		      spr_Game_Pause_Bg;

    protected BitmapTextureAtlas[]     tex_Game_Pause_Btn	    = new BitmapTextureAtlas[3];
    protected TiledTextureRegion[]     reg_Game_Pause_Btn	    = new TiledTextureRegion[3];
    public TiledSprite		 spr_Game_Pause_Btn;
    public ArrayList<TiledSprite>      lst_Game_Pause_Btn	    = new ArrayList<TiledSprite>();

    protected Rectangle		rec_Game_Over_Bg;
    public ArrayList<Rectangle>	lst_Game_Over_Bg	      = new ArrayList<Rectangle>();

    protected BitmapTextureAtlas       tex_Game_Over_Mc;
    protected TextureRegion	    reg_Game_Over_Mc;
    public Sprite		      spr_Game_Over_MC;

    protected BitmapTextureAtlas       tex_Game_Over_Txt;
    protected TextureRegion	    reg_Game_Over_Txt;
    public Sprite		      spr_Game_Over_Txt;

    public BitmapTextureAtlas[]	tex_Game_Over_Btn	     = new BitmapTextureAtlas[2];
    protected TiledTextureRegion[]     reg_Game_Over_Btn	     = new TiledTextureRegion[2];
    protected TiledSprite	      spr_Game_Over_Btn;
    public ArrayList<TiledSprite>      lst_Game_Over_Btn	     = new ArrayList<TiledSprite>();

    protected BitmapTextureAtlas       tex_Game_Over_Darah;
    protected TiledTextureRegion       reg_Game_Over_Darah;
    public AnimatedSprite	      spr_Game_Over_Darah;

    protected Rectangle		rec_Game_Win_Bg;
    public ArrayList<Rectangle>	lst_Game_Win_Bg	       = new ArrayList<Rectangle>();

    protected BitmapTextureAtlas       tex_Game_Win_Mc;
    protected TextureRegion	    reg_Game_Win_Mc;
    public Sprite		      spr_Game_Win_Mc;

    protected BitmapTextureAtlas       tex_Game_Win_Txt;
    protected TextureRegion	    reg_Game_Win_Txt;
    public Sprite		      spr_Game_Win_Txt;

    protected BitmapTextureAtlas       tex_Game_Win_Tulang;
    protected TextureRegion	    reg_Game_Win_Tulang;
    public Sprite		      spr_Game_Win_Tulang;
    public ArrayList<Sprite>	   lst_Game_Win_Tulang	   = new ArrayList<Sprite>();

    protected BitmapTextureAtlas[]     tex_Game_Win_Btn	      = new BitmapTextureAtlas[3];
    protected TiledTextureRegion[]     reg_Game_Win_Btn	      = new TiledTextureRegion[3];
    protected TiledSprite	      spr_Game_Win_Btn;
    public ArrayList<TiledSprite>      lst_Game_Win_Btn	      = new ArrayList<TiledSprite>();

    public Grafik_Load(
	    Context context,
	    Scene p_Scene,
	    HUD p_Hud,
	    ZoomCamera p_Camera)
    {
	activity = (BaseGameActivity) context;
	m_Scene = p_Scene;
	m_Hud = p_Hud;
	m_Camera = p_Camera;
	m_Control = (IOnScreenControlListener) activity;
    }

    protected TextureManager getTexMan()
    {
	return activity.getTextureManager();
    }

    protected VertexBufferObjectManager getVertex()
    {
	return activity.getVertexBufferObjectManager();
    }

    public void loadLogo()
    {
	for (int i = 0; i < LOGO.length; i++)
	{
		tex_Logo[i] = new BitmapTextureAtlas(
			getTexMan(),
			LOGO_TEX_WIDTH,
			LOGO_TEX_HEIGHT,
			Utils.getTextureOption());

		reg_Logo[i] = BitmapTextureAtlasTextureRegionFactory.createFromAsset(
			tex_Logo[i],
			activity,
			LOGO[i],
			0,
			0);

		tex_Logo[i].load();
	    
	}
    }

    public void loadIconSocial()
    {
	for (int i = 0; i < ICON_SOCIAL.length; i++)
	{
		tex_Icon_Social[i] = new BitmapTextureAtlas(
			getTexMan(),
			ICON_SOCIAL_TEX_WIDTH,
			ICON_SOCIAL_TEX_HEIGHT,
			Utils.getTextureOption());

		reg_Icon_Social[i] = BitmapTextureAtlasTextureRegionFactory.createFromAsset(
			tex_Icon_Social[i],
			activity,
			ICON_SOCIAL[i],
			0,
			0);

		tex_Icon_Social[i].load();
	    
	}
    }

    // load logo untuk menu
    public void loadLogoHantu()
    {
	if (tex_LogoHantu != null)
	    return;

	tex_LogoHantu = new BitmapTextureAtlas(
		getTexMan(),
		LOGO_HANTU_TEX_WIDTH,
		LOGO_HANTU_TEX_HEIGHT,
		Utils.getTextureOption());

	reg_LogoHantu = BitmapTextureAtlasTextureRegionFactory.createFromAsset(
		tex_LogoHantu,
		activity,
		LOGO_HANTU,
		0,
		0);
	tex_LogoHantu.load();

    }

    public void loadMenuMCBernafas()
    {
	if (tex_Menu_Mc_Bernafas != null)
	    return;

	tex_Menu_Mc_Bernafas = new BitmapTextureAtlas(
		getTexMan(),
		MENU_MC_BERNAFAS_TEX_WIDTH,
		MENU_MC_BERNAFAS_TEX_HEIGHT,
		Utils.getTextureOption());

	reg_Menu_Mc_Bernafas = BitmapTextureAtlasTextureRegionFactory
		.createTiledFromAsset(
			tex_Menu_Mc_Bernafas,
			activity,
			MENU_MC_BERNAFAS,
			0,
			0,
			MENU_MC_BERNAFAS_COLUMN,
			MENU_MC_BERNAFAS_ROW);
	tex_Menu_Mc_Bernafas.load();
    }

    public void loadLoading()
    {
	if (tex_Loading != null)
	    return;

	tex_Loading = new BitmapTextureAtlas(
		getTexMan(),
		LOADING_TEX_WIDTH,
		LOADING_TEX_HEIGHT,
		Utils.getTextureOption());

	reg_Menu_Loading = BitmapTextureAtlasTextureRegionFactory
		.createFromAsset(tex_Loading, activity, LOADING_SCR, 0, 0);

	tex_Loading.load();
    }

    public void loadMenuMainBg()
    {
	if (tex_Menu_Main_Bg != null)
	    return;

	tex_Menu_Main_Bg = new BitmapTextureAtlas(
		getTexMan(),
		MENU_MAIN_BG_TEX_WIDTH,
		MENU_MAIN_BG_TEX_HEIGHT,
		Utils.getTextureOption());

	reg_Menu_Main_Bg = BitmapTextureAtlasTextureRegionFactory
		.createFromAsset(tex_Menu_Main_Bg, activity, MENU_MAIN_BG, 0, 0);

	tex_Menu_Main_Bg.load();

	if (tex_Menu_Kelelawar != null)
	    return;

	tex_Menu_Kelelawar = new BitmapTextureAtlas(
		getTexMan(),
		MENU_KELELAWAR_TEX_WIDTH,
		MENU_KELELAWAR_TEX_HEIGHt,
		Utils.getTextureOption());

	reg_Menu_Kelelawar = BitmapTextureAtlasTextureRegionFactory
		.createTiledFromAsset(
			tex_Menu_Kelelawar,
			activity,
			MENU_KELELAWAR,
			0,
			0,
			MENU_KELELAWAR_COLUMN,
			MENU_KELELAWAR_ROW);

	tex_Menu_Kelelawar.load();
    }

    public void loadMenuLonceng()
    {
	if (tex_Menu_Lonceng != null)
	    return;

	tex_Menu_Lonceng = new BitmapTextureAtlas(
		getTexMan(),
		MENU_LONCENG_TEX_WIDTH,
		MENU_LONCENG_TEX_HEIGHT,
		Utils.getTextureOption());

	reg_Menu_Lonceng = BitmapTextureAtlasTextureRegionFactory
		.createTiledFromAsset(
			tex_Menu_Lonceng,
			activity,
			MENU_LONCENG,
			0,
			0,
			MENU_LONCENG_COLUMN,
			MENU_LONCENG_ROW);

	tex_Menu_Lonceng.load();
    }

    public void loadMenuMainBtn()
    {
	for (int i = 0; i < MENU_MAIN_BTN.length; i++)
	{
	    if (tex_Menu_Main_Btn[i] != null)
		return;

	    tex_Menu_Main_Btn[i] = new BitmapTextureAtlas(
		    getTexMan(),
		    MENU_MAIN_BTN_TEX_WIDTH,
		    MENU_MAIN_BTN_TEX_HEIGHT,
		    Utils.getTextureOption());

	    reg_Menu_Main_Btn[i] = BitmapTextureAtlasTextureRegionFactory
		    .createFromAsset(
			    tex_Menu_Main_Btn[i],
			    activity,
			    MENU_MAIN_BTN[i],
			    0,
			    0);

	    tex_Menu_Main_Btn[i].load();
	}
    }

    public void loadMenuLingkaran()
    {
	if (tex_Menu_Lingkaran != null)
	    return;

	tex_Menu_Lingkaran = new BitmapTextureAtlas(
		getTexMan(),
		MENU_SELECT_LINGKARAN_TEX_WIDTH,
		MENU_SELECT_LINGKARAN_TEX_HEIGHT,
		Utils.getTextureOption());

	reg_Menu_Lingkaran = BitmapTextureAtlasTextureRegionFactory
		.createTiledFromAsset(
			tex_Menu_Lingkaran,
			activity,
			MENU_LINGKARAN,
			0,
			0,
			MENU_SELECT_LINGKARAN_COLUMN,
			MENU_SELECT_LINGKARAN_ROW);

	tex_Menu_Lingkaran.load();
    }

    public void loadMenuSelectStage()
    {
	for (int i = 0; i < MENU_SELECT_STAGE_BG.length; i++)
	{
	    if (tex_Menu_Select_Stage[i] != null)
		return;

	    tex_Menu_Select_Stage[i] = new BitmapTextureAtlas(
		    getTexMan(),
		    MENU_SELECT_STAGE_TEX_WIDTH,
		    MENU_SELECT_STAGE_TEX_HEIGHT,
		    Utils.getTextureOption());
	    reg_Menu_Select_Stage[i] = BitmapTextureAtlasTextureRegionFactory
		    .createFromAsset(
			    tex_Menu_Select_Stage[i],
			    activity,
			    MENU_SELECT_STAGE_BG[i],
			    0,
			    0);
	    tex_Menu_Select_Stage[i].load();

	}

    }

    public void loadMenuLevelBg()
    {
	for (int i = 0; i < tex_Menu_Level_Bg.length; i++)
	{
	    if (tex_Menu_Level_Bg[i] != null)
		return;

	    tex_Menu_Level_Bg[i] = new BitmapTextureAtlas(
		    getTexMan(),
		    MENU_LEVEL_BG_TEX_WIDTH,
		    MENU_LEVEL_BG_TEX_HEIGHT,
		    Utils.getTextureOption());

	    reg_Menu_Level_Bg[i] = BitmapTextureAtlasTextureRegionFactory
		    .createFromAsset(
			    tex_Menu_Level_Bg[i],
			    activity,
			    MENU_LEVEL_BG[i],
			    0,
			    0);

	    tex_Menu_Level_Bg[i].load();

	}

    }

    public void loadMenuLevelBtn()
    {
	// for (int i = 0; i < 2; i++)
	// {
	if (tex_Menu_Level_Btn != null)
	    return;

	tex_Menu_Level_Btn = new BitmapTextureAtlas(
		getTexMan(),
		MENU_LEVEL_BTN_TEX_WIDTH,
		MENU_LEVEL_BTN_TEX_HEIGHT,
		Utils.getTextureOption());

	reg_Menu_Level_Btn = BitmapTextureAtlasTextureRegionFactory
		.createFromAsset(
			tex_Menu_Level_Btn,
			activity,
			MENU_LEVEL_BTN,
			0,
			0);

	tex_Menu_Level_Btn.load();
	// }

    }

    public void loadMenuLevelBtnKuburan()
    {
	if (tex_Menu_Level_Btn_Gembok != null)
	    return;

	tex_Menu_Level_Btn_Gembok = new BitmapTextureAtlas(
		getTexMan(),
		MENU_LEVEL_GEMBOK_TEX_WIDTH,
		MENU_LEVEL_GEMBOK_TEX_HEIGHT,
		Utils.getTextureOption());
	reg_Menu_Level_Btn_Gembok = BitmapTextureAtlasTextureRegionFactory
		.createFromAsset(
			tex_Menu_Level_Btn_Gembok,
			activity,
			MENU_LEVEL_GEMBOK,
			0,
			0);
	tex_Menu_Level_Btn_Gembok.load();

    }

    public void loadMenuLevelBtnTulang()
    {
	if (tex_Menu_Level_Btn_Tulang != null)
	    return;

	tex_Menu_Level_Btn_Tulang = new BitmapTextureAtlas(
		getTexMan(),
		MENU_LEVEL_TULANG_TEX_WIDTH,
		MENU_LEVEL_TULANG_TEX_WIDTH,
		Utils.getTextureOption());

	reg_Menu_Level_Btn_Tulang = BitmapTextureAtlasTextureRegionFactory
		.createFromAsset(
			tex_Menu_Level_Btn_Tulang,
			activity,
			MENU_LEVEL_TULANG,
			0,
			0);

	tex_Menu_Level_Btn_Tulang.load();
    }

    public void loadMenuCreditsBg()
    {
	if (tex_Menu_Credits_Bg != null)
	    return;

	tex_Menu_Credits_Bg = new BitmapTextureAtlas(
		getTexMan(),
		MENU_CREDITS_BG_TEX_WIDTH,
		MENU_CREDITS_BG_TEX_HEIGHT,
		Utils.getTextureOption());

	reg_Menu_Credits_Bg = BitmapTextureAtlasTextureRegionFactory
		.createFromAsset(
			tex_Menu_Credits_Bg,
			activity,
			MENU_CREDITS_BG,
			0,
			0);

	tex_Menu_Credits_Bg.load();

	if (tex_Menu_Credits_Logo_Agd != null)
	    return;

	tex_Menu_Credits_Logo_Agd = new BitmapTextureAtlas(
		getTexMan(),
		MENU_CREDITS_LOGOAGD_TEX_WIDTH,
		MENU_CREDITS_LOGOAGD_TEX_HEIGHT,
		Utils.getTextureOption());
	reg_Menu_Credits_Logo_Agd = BitmapTextureAtlasTextureRegionFactory
		.createFromAsset(
			tex_Menu_Credits_Logo_Agd,
			activity,
			MENU_CREDIT_LOGO_CUPCORN,
			0,
			0);
	tex_Menu_Credits_Logo_Agd.load();

	if (tex_Menu_Credits_Logo_Amikom != null)
	    return;

	tex_Menu_Credits_Logo_Amikom = new BitmapTextureAtlas(
		getTexMan(),
		MENU_CREDITS_LOGOAMIKOM_TEX_WIDTH,
		MENU_CREDITS_LOGOAMIKOM_TEX_HEIGHT,
		Utils.getTextureOption());
	reg_Menu_Credits_Logo_Amikom = BitmapTextureAtlasTextureRegionFactory
		.createFromAsset(
			tex_Menu_Credits_Logo_Amikom,
			activity,
			MENU_CREDIT_LOGO_AGD,
			0,
			0);
	tex_Menu_Credits_Logo_Amikom.load();
    }

    public void loadMenuHelp()
    {
	for (int i = 0; i < tex_Menu_Help.length; i++)
	{
	    tex_Menu_Help[i] = new BitmapTextureAtlas(
			getTexMan(),
			MENU_HELP_BG_TEX_WIDTH,
			MENU_HELP_BG_TEX_HEIGHT,
			Utils.getTextureOption());
	    
	    reg_Menu_Help[i] = BitmapTextureAtlasTextureRegionFactory
			.createFromAsset(tex_Menu_Help[i], activity, MENU_HELP[i], 0, 0);
	    
	    tex_Menu_Help[i].load();
	}
    }

//    public void loadMenuHelpBg()
//    {
//	if (tex_Menu_Help_Bg != null)
//	    return;
//
//	tex_Menu_Help_Bg = new BitmapTextureAtlas(
//		getTexMan(),
//		MENU_HELP_BG_TEX_WIDTH,
//		MENU_HELP_BG_TEX_HEIGHT,
//		Utils.getTextureOption());
//
//	reg_Menu_Help_Bg = BitmapTextureAtlasTextureRegionFactory
//		.createFromAsset(tex_Menu_Help_Bg, activity, MENU_HELP_BG, 0, 0);
//
//	tex_Menu_Help_Bg.load();
//
//	if (tex_Menu_Help_Coin != null)
//	    return;
//	tex_Menu_Help_Coin = new BitmapTextureAtlas(
//		getTexMan(),
//		MENU_HELP_COIN_TEX_WIDTH,
//		MENU_HELP_COIN_TEX_HEIGHT,
//		Utils.getTextureOption());
//
//	reg_Menu_Help_Coin = BitmapTextureAtlasTextureRegionFactory
//		.createTiledFromAsset(
//			tex_Menu_Help_Coin,
//			activity,
//			MENU_HELP_COIN,
//			0,
//			0,
//			GAME_PLAY_COLLECTION_COLUMN,
//			GAME_PLAY_COLLECTION_ROW);
//
//	tex_Menu_Help_Coin.load();
//
//	if (tex_Menu_Help_Pelampung != null)
//	    return;
//	tex_Menu_Help_Pelampung = new BitmapTextureAtlas(
//		getTexMan(),
//		MENU_HELP_PELAMPUNG_TEX_WIDTH,
//		MENU_HELP_PELAMPUNG_TEX_HEIGHT,
//		Utils.getTextureOption());
//
//	reg_Menu_Help_Pelampung = BitmapTextureAtlasTextureRegionFactory
//		.createFromAsset(
//			tex_Menu_Help_Pelampung,
//			activity,
//			MENU_HELP_PELAMPUNG,
//			0,
//			0);
//
//	tex_Menu_Help_Pelampung.load();
//
//	if (tex_Menu_Help_Tombol != null)
//	    return;
//	tex_Menu_Help_Tombol = new BitmapTextureAtlas(
//		getTexMan(),
//		MENU_HELP_TOMBOL_TEX_WIDTH,
//		MENU_HELP_TOMBOL_TEX_HEIGHT,
//		Utils.getTextureOption());
//
//	reg_Menu_Help_Tombol = BitmapTextureAtlasTextureRegionFactory
//		.createFromAsset(
//			tex_Menu_Help_Tombol,
//			activity,
//			MENU_HELP_TOMBOL,
//			0,
//			0);
//
//	tex_Menu_Help_Tombol.load();
//    }

    @SuppressWarnings("deprecation")
    public void loadGamePlayBg()
    {
	try
	{
	    if (tmx_Load_Game_Play == null)
		tmx_Load_Game_Play = new TMXLoader(
			activity,
			getTexMan(),
			Utils.getTextureOption(),
			getVertex());

	    tmx_Tiled_Game_Play = tmx_Load_Game_Play
		    .loadFromAsset("tmx/" + MAP[Server_Data.getStage()][Server_Data
			    .getMap()]);
	}
	catch (Exception e)
	{
	    Utils.DEBUG(e);
	}
    }

    @SuppressWarnings("deprecation")
    public void loadGameWinTmx()
    {
	try
	{
	    if (tmx_Load_Game_Win == null)
		tmx_Load_Game_Win = new TMXLoader(
			activity,
			getTexMan(),
			Utils.getTextureOption(),
			getVertex());

	    tmx_Tiled_Game_Win = tmx_Load_Game_Win
		    .loadFromAsset("tmx/Game_Win_Config.tmx");
	}
	catch (Exception e)
	{
	    Utils.DEBUG(e);
	}
    }

    @SuppressWarnings("deprecation")
    public void loadTmxInformasi()
    {
	try
	{
	    // if (tmx_Load_Informasi == null)
	    tmx_Load_Informasi = new TMXLoader(
		    activity,
		    getTexMan(),
		    Utils.getTextureOption(),
		    getVertex());

	    // if (tmx_Tiled_Informasi == null)
	    tmx_Tiled_Informasi = tmx_Load_Informasi
		    .loadFromAsset("tmx/gameplay.tmx");
	}
	catch (Exception e)
	{
	    Utils.DEBUG(e);
	}
    }

    public void loadGamePlayMc()
    {
	for (int i = 0; i < 2; i++)
	{
	    if (tex_Game_Play_Mc[i] != null)
		return;

	    tex_Game_Play_Mc[i] = new BitmapTextureAtlas(
		    getTexMan(),
		    GAME_PLAY_MC_TEX_WIDTH[i],
		    GAME_PLAY_MC_TEX_HEIGHT[i],
		    Utils.getTextureOption());

	    reg_Game_Play_Mc[i] = BitmapTextureAtlasTextureRegionFactory
		    .createTiledFromAsset(
			    tex_Game_Play_Mc[i],
			    activity,
			    GAME_PLAY_MC[i],
			    0,
			    0,
			    GAME_PLAY_MC_COLUMN[i],
			    GAME_PLAY_MC_ROW[i]);

	    tex_Game_Play_Mc[i].load();
	}
    }

    public void loadGamePlayBtn()
    {
	for (int i = 0; i < tex_Game_Play_Btn.length; i++)
	{
	    if (tex_Game_Play_Btn[i] != null)
		return;

	    tex_Game_Play_Btn[i] = new BitmapTextureAtlas(
		    getTexMan(),
		    GAME_PLAY_BTN_TEX_WIDTH[i],
		    GAME_PLAY_BTN_TEX_HEIGHT[i],
		    Utils.getTextureOption());

	    reg_Game_Play_Btn[i] = BitmapTextureAtlasTextureRegionFactory
		    .createTiledFromAsset(
			    tex_Game_Play_Btn[i],
			    activity,
			    GAME_PLAY_BTN_ARROW[i],
			    0,
			    0,
			    GAME_PLAY_BTN_COLUMN[i],
			    GAME_PLAY_BTN_ROW[i]);

	    tex_Game_Play_Btn[i].load();
	}
    }

    // public void loadGamePlayControl()
    // {
    // // if (tex_Game_Play_Control != null) return;
    //
    // tex_Game_Play_Control = new BitmapTextureAtlas(
    // getTexMan()
    // , GAME_PLAY_CONTROL_TEX_WIDTH
    // , GAME_PLAY_CONTROL_TEX_HEIGHT
    // , Utils.getTextureOption());
    //
    // reg_Game_Play_Control_Base = BitmapTextureAtlasTextureRegionFactory
    // .createFromAsset(tex_Game_Play_Control, activity
    // , GAME_PLAY_CONTROL[0], 0, 0);
    // reg_Game_Play_Control_Knob = BitmapTextureAtlasTextureRegionFactory
    // .createFromAsset(tex_Game_Play_Control, activity
    // , GAME_PLAY_CONTROL[1], 128, 0);
    //
    // tex_Game_Play_Control.load();
    // }

    public void loadGamePlayFloat()
    {
	if (tex_Game_Play_Float != null)
	    return;

	tex_Game_Play_Float = new BitmapTextureAtlas(
		getTexMan(),
		GAME_PLAY_FLOAT_TEX_WIDTH,
		GAME_PLAY_FLOAT_TEX_HEIGHT,
		Utils.getTextureOption());

	reg_Game_Play_Float = BitmapTextureAtlasTextureRegionFactory
		.createTiledFromAsset(
			tex_Game_Play_Float,
			activity,
			GAME_PLAY_FLOAT,
			0,
			0,
			GAME_PLAY_FLOAT_COLUMN,
			GAME_PLAY_FLOAT_ROW);

	tex_Game_Play_Float.load();
    }

    public void loadGamePlayGhost()
    {
	for (int i = 0; i < tex_Game_Play_Ghost.length; i++)
	{
	    if (tex_Game_Play_Ghost[i] != null)
		return;

	    tex_Game_Play_Ghost[i] = new BitmapTextureAtlas(
		    getTexMan(),
		    GAME_PLAY_GHOST_TEX_WIDTH[i],
		    GAME_PLAY_GHOST_TEX_HEIGHT[i],
		    Utils.getTextureOption());

	    reg_Game_Play_Ghost[i] = BitmapTextureAtlasTextureRegionFactory
		    .createTiledFromAsset(
			    tex_Game_Play_Ghost[i],
			    activity,
			    GAME_PLAY_GHOST[i],
			    0,
			    0,
			    GAME_PLAY_GHOST_COLUMN[i],
			    GAME_PLAY_GHOST_ROW[i]);

	    tex_Game_Play_Ghost[i].load();
	}
    }

    public void loadGamePlayBtnGhost()
    {
	if (tex_Game_Play_Btn_Ghost != null)
	    return;

	tex_Game_Play_Btn_Ghost = new BitmapTextureAtlas(
		getTexMan(),
		GAME_PLAY_BTN_GHOST_TEX_WIDTH,
		GAME_PLAY_BTN_GHOST_TEX_HEIGHT,
		Utils.getTextureOption());

	reg_Game_Play_Btn_Ghost = BitmapTextureAtlasTextureRegionFactory
		.createTiledFromAsset(
			tex_Game_Play_Btn_Ghost,
			activity,
			GAME_PLAY_BTN_GHOST,
			0,
			0,
			GAME_PLAY_BTN_GHOST_COLUMN,
			GAME_PLAY_BTN_GHOST_ROW);

	tex_Game_Play_Btn_Ghost.load();
    }

    public void loadGamePlayCollection()
    {
	if (tex_Game_Play_Collection != null)
	    return;

	tex_Game_Play_Collection = new BitmapTextureAtlas(
		getTexMan(),
		GAME_PLAY_COLLECTION_TEX_WIDTH,
		GAME_PLAY_COLLECTION_TEX_HEIGHT,
		Utils.getTextureOption());

	reg_Game_Play_Collection = BitmapTextureAtlasTextureRegionFactory
		.createTiledFromAsset(
			tex_Game_Play_Collection,
			activity,
			GAME_PLAY_COLLECTION,
			0,
			0,
			GAME_PLAY_COLLECTION_COLUMN,
			GAME_PLAY_COLLECTION_ROW);

	tex_Game_Play_Collection.load();
    }

    public void loadGamePlayFire()
    {
	if (tex_Game_Play_Fire != null)
	    return;

	tex_Game_Play_Fire = new BitmapTextureAtlas(
		getTexMan(),
		GAME_PLAY_FIRE_TEX_WIDTH,
		GAME_PLAY_FIRE_TEX_HEIGHT,
		Utils.getTextureOption());

	reg_Game_Play_Fire = BitmapTextureAtlasTextureRegionFactory
		.createTiledFromAsset(
			tex_Game_Play_Fire,
			activity,
			GAME_PLAY_FIRE,
			0,
			0,
			GAME_PLAY_FIRE_COLUMN,
			GAME_PLAY_FIRE_ROW);

	tex_Game_Play_Fire.load();
    }

    public void loadGamePlayMist()
    {
	if (tex_Game_Play_Mist != null)
	    return;

	tex_Game_Play_Mist = new BitmapTextureAtlas(
		getTexMan(),
		GAME_PLAY_MIST_TEX_WIDTH,
		GAME_PLAY_MIST_TEX_HEIGHT,
		Utils.getTextureOption());

	reg_Game_Play_Mist = BitmapTextureAtlasTextureRegionFactory
		.createTiledFromAsset(
			tex_Game_Play_Mist,
			activity,
			GAME_PLAY_MIST,
			0,
			0,
			GAME_PLAY_MIST_COLUMN,
			GAME_PLAY_MIST_ROW);

	tex_Game_Play_Mist.load();
    }

    public void loadGamePlayWater()
    {
	if (tex_Game_Play_Water != null)
	    return;

	tex_Game_Play_Water = new BitmapTextureAtlas(
		getTexMan(),
		GAME_PLAY_WATER_TEX_WIDTH,
		GAME_PLAY_WATER_TEX_HEIGHT,
		Utils.getTextureOption());

	reg_Game_Play_Water = BitmapTextureAtlasTextureRegionFactory
		.createTiledFromAsset(
			tex_Game_Play_Water,
			activity,
			GAME_PLAY_WATER,
			0,
			0,
			GAME_PLAY_WATER_COLUMN,
			GAME_PLAY_WATER_ROW);

	tex_Game_Play_Water.load();
    }

    public void loadGamePlayTaskbarBg()
    {
	if (tex_Game_Play_Taskbar_Bg != null)
	    return;

	tex_Game_Play_Taskbar_Bg = new BitmapTextureAtlas(
		getTexMan(),
		GAME_PLAY_TASKBAR_BG_TEX_WIDTH,
		GAME_PLAY_TASKBAR_BG_TEX_HEIGHT,
		Utils.getTextureOption());

	reg_Game_Play_Taskbar_Bg = BitmapTextureAtlasTextureRegionFactory
		.createFromAsset(
			tex_Game_Play_Taskbar_Bg,
			activity,
			GAME_PLAY_TASKBAR_BG,
			0,
			0);

	tex_Game_Play_Taskbar_Bg.load();
    }

    public void loadGamePlayTaskbarMc()
    {
	if (tex_Game_Play_TaskBar_Mc != null)
	    return;

	tex_Game_Play_TaskBar_Mc = new BitmapTextureAtlas(
		getTexMan(),
		GAME_PLAY_TASKBAR_MC_TEX_WIDTH,
		GAME_PLAY_TASKBAR_MC_TEX_HEIGHT,
		Utils.getTextureOption());

	reg_Game_Play_TaskBar_Mc = BitmapTextureAtlasTextureRegionFactory
		.createTiledFromAsset(
			tex_Game_Play_TaskBar_Mc,
			activity,
			GAME_PLAY_TASKBAR_MC,
			0,
			0,
			GAME_PLAY_TASKBAR_MC_COLUMN,
			GAME_PLAY_TASKBAR_MC_ROW);

	tex_Game_Play_TaskBar_Mc.load();
    }

    public void loadGamePlayTaskbarBtn()
    {
	if (tex_Game_Play_TaskBar_Btn != null)
	    return;

	tex_Game_Play_TaskBar_Btn = new BitmapTextureAtlas(
		getTexMan(),
		GAME_PLAY_TASKBAR_BTN_TEX_WIDTH,
		GAME_PLAY_TASKBAR_BTN_TEX_HEIGHT,
		Utils.getTextureOption());

	reg_Game_Play_TaskBar_Btn = BitmapTextureAtlasTextureRegionFactory
		.createFromAsset(
			tex_Game_Play_TaskBar_Btn,
			activity,
			GAME_PLAY_TASKBAR_BTN,
			0,
			0);

	tex_Game_Play_TaskBar_Btn.load();
    }

    public void loadGamePlayTaskbarRule()
    {
	if (tex_Game_Play_Taskbar_Rule != null)
	    return;

	tex_Game_Play_Taskbar_Rule = new BitmapTextureAtlas(
		getTexMan(),
		GAME_PLAY_TASKBAR_RULE_TEX_WIDTH,
		GAME_PLAY_TASKBAR_RULE_TEX_HEIGHT,
		Utils.getTextureOption());

	reg_Game_Play_Taskbar_Rule = BitmapTextureAtlasTextureRegionFactory
		.createTiledFromAsset(
			tex_Game_Play_Taskbar_Rule,
			activity,
			GAME_PLAY_TASKBAR_RULE,
			0,
			0,
			GAME_PLAY_TASKBAR_RULE_COLUMN,
			GAME_PLAY_TASKBAR_RULE_ROW);

	tex_Game_Play_Taskbar_Rule.load();
    }

    public void loadGamePauseBg()
    {
	if (tex_Game_Pause_Bg != null)
	    return;

	tex_Game_Pause_Bg = new BitmapTextureAtlas(
		getTexMan(),
		GAME_PAUSE_BG_TEX_WIDTH,
		GAME_PAUSE_BG_TEX_HEIGHT,
		Utils.getTextureOption());

	reg_Game_Pause_Bg = BitmapTextureAtlasTextureRegionFactory
		.createFromAsset(
			tex_Game_Pause_Bg,
			activity,
			GAME_PAUSE_BG,
			0,
			0);

	tex_Game_Pause_Bg.load();
    }

    public void loadGamePauseBtn()
    {
	for (int i = 0; i < tex_Game_Pause_Btn.length; i++)
	{
	    if (tex_Game_Pause_Btn[i] != null)
		return;

	    tex_Game_Pause_Btn[i] = new BitmapTextureAtlas(
		    getTexMan(),
		    GAME_PAUSE_BTN_TEX_WIDTH,
		    GAME_PAUSE_BTN_TEX_HEIGHT,
		    Utils.getTextureOption());

	    reg_Game_Pause_Btn[i] = BitmapTextureAtlasTextureRegionFactory
		    .createTiledFromAsset(
			    tex_Game_Pause_Btn[i],
			    activity,
			    GAME_PAUSE_BTN[i],
			    0,
			    0,
			    GAME_PAUSE_BTN_COLUMN,
			    GAME_PAUSE_BTN_ROW);

	    tex_Game_Pause_Btn[i].load();
	}
    }

    public void loadGameOverMc()
    {
	if (tex_Game_Over_Mc != null)
	    return;

	tex_Game_Over_Mc = new BitmapTextureAtlas(
		getTexMan(),
		GAME_OVER_MC_TEX_WIDTH,
		GAME_OVER_MC_TEX_HEIGHT,
		Utils.getTextureOption());

	reg_Game_Over_Mc = BitmapTextureAtlasTextureRegionFactory
		.createFromAsset(tex_Game_Over_Mc, activity, GAME_OVER_MC, 0, 0);

	tex_Game_Over_Mc.load();
    }

    public void loadGameOverTxt()
    {
	if (tex_Game_Over_Txt != null)
	    return;

	tex_Game_Over_Txt = new BitmapTextureAtlas(
		getTexMan(),
		GAME_OVER_TXT_TEX_WIDTH,
		GAME_OVER_TXT_TEX_HEIGHT,
		Utils.getTextureOption());

	reg_Game_Over_Txt = BitmapTextureAtlasTextureRegionFactory
		.createFromAsset(
			tex_Game_Over_Txt,
			activity,
			GAME_OVER_TXT,
			0,
			0);

	tex_Game_Over_Txt.load();
    }

    public void loadGameOverBtn()
    {
	for (int i = 0; i < tex_Game_Over_Btn.length; i++)
	{
	    if (tex_Game_Over_Btn[i] != null)
		return;

	    tex_Game_Over_Btn[i] = new BitmapTextureAtlas(
		    getTexMan(),
		    GAME_OVER_BTN_TEX_WIDTH,
		    GAME_OVER_BTN_TEX_HEIGHT,
		    Utils.getTextureOption());

	    reg_Game_Over_Btn[i] = BitmapTextureAtlasTextureRegionFactory
		    .createTiledFromAsset(
			    tex_Game_Over_Btn[i],
			    activity,
			    GAME_OVER_BTN[i],
			    0,
			    0,
			    GAME_OVER_BTN_COLUMN,
			    GAME_OVER_BTN_ROW);

	    tex_Game_Over_Btn[i].load();

	}
    }

    public void loadGameOverDarah()
    {
	if (tex_Game_Over_Darah != null)
	    return;

	tex_Game_Over_Darah = new BitmapTextureAtlas(
		getTexMan(),
		GAME_OVER_DARAH_TEX_WIDTH,
		GAME_OVER_DARAH_TEX_HEIGHT,
		Utils.getTextureOption());

	reg_Game_Over_Darah = BitmapTextureAtlasTextureRegionFactory
		.createTiledFromAsset(
			tex_Game_Over_Darah,
			activity,
			GAME_OVER_DARAH,
			0,
			0,
			GAME_OVER_DARAH_COLUMN,
			GAME_OVER_DARAH_ROW);

	tex_Game_Over_Darah.load();
    }

    public void loadGameWinMc()
    {
	if (tex_Game_Win_Mc != null)
	    return;

	tex_Game_Win_Mc = new BitmapTextureAtlas(
		getTexMan(),
		GAME_WIN_MC_TEX_WIDTH,
		GAME_WIN_MC_TEX_HEIGHT,
		Utils.getTextureOption());

	reg_Game_Win_Mc = BitmapTextureAtlasTextureRegionFactory
		.createFromAsset(tex_Game_Win_Mc, activity, GAME_WIN_MC, 0, 0);

	tex_Game_Win_Mc.load();
    }

    public void loadGameWinTxt()
    {
	if (tex_Game_Win_Txt != null)
	    return;

	tex_Game_Win_Txt = new BitmapTextureAtlas(
		getTexMan(),
		GAME_WIN_TXT_TEX_WIDTH,
		GAME_WIN_TXT_TEX_HEIGHT,
		Utils.getTextureOption());

	reg_Game_Win_Txt = BitmapTextureAtlasTextureRegionFactory
		.createFromAsset(tex_Game_Win_Txt, activity, GAME_WIN_TXT, 0, 0);

	tex_Game_Win_Txt.load();
    }

    public void loadGameWinBtn()
    {
	for (int i = 0; i < tex_Game_Win_Btn.length; i++)
	{
	    if (tex_Game_Win_Btn[i] != null)
		return;

	    tex_Game_Win_Btn[i] = new BitmapTextureAtlas(
		    getTexMan(),
		    GAME_WIN_BTN_TEX_WIDTH,
		    GAME_WIN_BTN_TEX_HEIGHT,
		    Utils.getTextureOption());

	    reg_Game_Win_Btn[i] = BitmapTextureAtlasTextureRegionFactory
		    .createTiledFromAsset(
			    tex_Game_Win_Btn[i],
			    activity,
			    GAME_WIN_BTN[i],
			    0,
			    0,
			    GAME_WIN_BTN_COLUMN,
			    GAME_WIN_BTN_ROW);

	    tex_Game_Win_Btn[i].load();

	}
    }

    public void loadGameWinTulang()
    {
	if (tex_Game_Win_Tulang != null)
	    return;

	tex_Game_Win_Tulang = new BitmapTextureAtlas(
		getTexMan(),
		GAME_WIN_TULANG_TEX_WIDTH,
		GAME_WIN_TULANG_TEX_HEIGHT,
		Utils.getTextureOption());

	reg_Game_Win_Tulang = BitmapTextureAtlasTextureRegionFactory
		.createFromAsset(
			tex_Game_Win_Tulang,
			activity,
			GAME_WIN_TULANG,
			0,
			0);

	tex_Game_Win_Tulang.load();
    }

    public void load()
    {
	if (tex_ != null)
	    return;

	tex_ = new BitmapTextureAtlas(
		getTexMan(),
		0,
		0,
		Utils.getTextureOption());

	reg_ = BitmapTextureAtlasTextureRegionFactory.createFromAsset(
		tex_,
		activity,
		"",
		0,
		0);

	tex_Loading.load();
    }

}
